home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group92c.txt
/
000066_icon-group-sender _Thu Nov 5 04:55:57 1992.msg
< prev
next >
Wrap
Internet Message Format
|
1993-01-04
|
2KB
Received: by cheltenham.cs.arizona.edu; Sat, 7 Nov 1992 05:55:54 MST
Date: 5 Nov 92 04:55:57 GMT
From: uchinews!ellis!goer@speedy.wisc.edu (Richard L. Goerwitz)
Organization: University of Chicago Computing Organizations
Subject: Re: file scanning
Message-Id: <1992Nov5.045557.15162@midway.uchicago.edu>
References: <01GQRAOSOAB48WWBJA@KUNRC1.URC.KUN.NL>
Sender: icon-group-request@cs.arizona.edu
To: icon-group@cs.arizona.edu
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
>>One thing that's worth thinking about is whether string scanning could
>>be extended to cover files. That would solve your problem.
>
>This was somewhat surprising to me, because I already do string
>scanning on files.
>
> !!inputfile ? while write(move(1))
This only gives us a character at a time, and isn't really and dif-
ferent than saying "while c := reads(inputfile) do (something with
c)." This really isn't scanning (where you can move to arbitrary
positions, perform analytical and synthetic operations, etc.). What
we are talking about is overloading the ? operator so that it can
take an expression on its left that produces either a string or a
file, so that if a file were produced, functions like move() would
still work. To work well, this would take a lot of seeking, and per-
haps a little creative buffering, plus a whole lot of work on the
machinery of scanning.
I think it's a neat idea, and I don't see how it would be the least
bit un-Iconish. It would sure make tokenizing a lot easier. Even
Icon's own tokenizer wouldn't work with scanning, but rather needs
a character-driven finite-state machine.
Ken, Ralph, Clint, etc.: How hard would it really be to implement
file scanning?
--
-Richard L. Goerwitz goer%midway@uchicago.bitnet
goer@midway.uchicago.edu rutgers!oddjob!ellis!goer